<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
<!--    clic 单机时间 bulr 光标失去焦点的事件-->
<input type="button" value="一个按钮" v-on:click="show()"><br>
<input type="button" value="一个按钮" @click="show01()"> <br>
<input type="button" value="一个按钮" @click="show02()">
</div>

<script src="js/vue.js"></script>
<script>
    new Vue({
        el:"#app",
        data(){
            return {
                username:"",
                url:"https://www.baidu.com",
            }
        },
        methods:{
            show(){
                alert("我被点了。。。。")
            },
            show01(){
                for(var i = 0; i < 5; i ++ ){
                    alert(i+ "我被点击了。。。")
                    // alert("第"+i +"次输出" + ": " + "hello world")
                }
            },
            show02() {
                for (var i = 0; i < 3;i ++ ) {
                    alert("第"+i +"次输出" + ": " + "hello world")
                }
            }
        }
    });
</script>
</body>
</html>